//
//  ViewController.swift
//  JLRouter
//
//  Created by JiangChencheng on 08/16/2024.
//  Copyright (c) 2024 JiangChencheng. All rights reserved.
//

import UIKit
import JLUIKit
import JLRouter
import Chain
import SnapKit

class ViewController: JLViewController {
    
    lazy var btn = UIButton()
        .x
        .setTitle("push demo", for: .normal)
        .setTitleColor(.black, for: .normal)
        .addTarget(self, action: #selector(nextAction), for: .touchUpInside)
        .instance

    override func viewDidLoad() {
        super.viewDidLoad()

        
        
      

        
        btn.x.add(to: view).snp.makeConstraints {
            $0.center.equalToSuperview()
        }
       
    }
    
    @objc
    func nextAction() {
        JLRouter.push(pattern: "demo?title=Example")
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

}

